home *** CD-ROM | disk | FTP | other *** search
- Path: ns2.emirates.net.ae!usenet
- From: kannan@emirates.net.ae (Kannan)
- Newsgroups: comp.lang.c
- Subject: Re: Finding a prime number
- Date: Sun, 11 Feb 1996 15:43:37 GMT
- Organization: ETISALAT Emirates Internet
- Message-ID: <4fl2tl$ln6@ns2.emirates.net.ae>
- References: <4e875s$nqk@reader2.ix.netcom.com> <7c8_9601301722@tor250.org> <4f7n1o$ol9@mother.usf.edu>
- NNTP-Posting-Host: csb006.emirates.net.ae
- X-Newsreader: Forte Free Agent 1.0.82
-
- yatesc@csee.usf.edu (Randy Yates) wrote:
-
- >In article <7c8_9601301722@tor250.org>, Andrew.Frank@fknights.gryn.org says...
- >>
- >>As advtr@ix.netcom.com had made knowen to All, on 25 Jan 96 10:21:32, I
- >>quote.
- >> ad> I need to write a function that will find wether or not a number is
- >> ad> prime. I can come close but I get numbers that are not prime with the
- >> ad> prime numbers.
-
- >#include<math.h>
- >#include<stdlib.h>
- >#include<fstream.h>
-
- Is it not easy to just check whether the integer is divisible by 2 or
- 3 and decide (except 1 & 3 which is a prime number)? For ex., 723232
- this would be divisible by 2 so not a prime number. And 997 cannot be
- divided by these 2. This is prime number. Please correct me if I am
- wrong without attacking me personally :)
-
- Kannan from Dubai.
- P O Box 16765
- Dubai
- United Arab Emirates
-
- Ph : 971 4 835551
- Fax : 971 4 835304
-
- Email : kannan@emirates.net.ae (internet)
- kn kannan@dmc (majornet)
-
-